//
//  NSString+Base64.m
//  ICome
//
//  Created by zhangrongwu on 16/5/30.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "NSString+Base64.h"

@implementation NSString (Base64)
+ (NSString *)base64EncodedStringWithData:(NSData *)data {
    return [data base64EncodedStringWithOptions:0];
}

+ (NSString *)base64DecodedString:(NSString *)sting {
    NSData *data = [[NSData alloc] initWithBase64EncodedString:sting options:0];
    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
@end
